package com.ruoyi.merchant.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.merchant.mapper.ComboProductsMapper;
import com.ruoyi.merchant.domain.ComboProducts;
import com.ruoyi.merchant.service.IComboProductsService;

/**
 * 套餐菜品关联Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-23
 */
@Service
public class ComboProductsServiceImpl implements IComboProductsService 
{
    @Autowired
    private ComboProductsMapper comboProductsMapper;

    /**
     * 查询套餐菜品关联
     * 
     * @param id 套餐菜品关联主键
     * @return 套餐菜品关联
     */
    @Override
    public ComboProducts selectComboProductsById(String id)
    {
        return comboProductsMapper.selectComboProductsById(id);
    }

    /**
     * 查询套餐菜品关联列表
     * 
     * @param comboProducts 套餐菜品关联
     * @return 套餐菜品关联
     */
    @Override
    public List<ComboProducts> selectComboProductsList(ComboProducts comboProducts)
    {
        return comboProductsMapper.selectComboProductsList(comboProducts);
    }

    /**
     * 新增套餐菜品关联
     * 
     * @param comboProducts 套餐菜品关联
     * @return 结果
     */
    @Override
    public int insertComboProducts(ComboProducts comboProducts)
    {
        return comboProductsMapper.insertComboProducts(comboProducts);
    }

    /**
     * 修改套餐菜品关联
     * 
     * @param comboProducts 套餐菜品关联
     * @return 结果
     */
    @Override
    public int updateComboProducts(ComboProducts comboProducts)
    {
        return comboProductsMapper.updateComboProducts(comboProducts);
    }

    /**
     * 批量删除套餐菜品关联
     * 
     * @param ids 需要删除的套餐菜品关联主键
     * @return 结果
     */
    @Override
    public int deleteComboProductsByIds(String[] ids)
    {
        return comboProductsMapper.deleteComboProductsByIds(ids);
    }

    /**
     * 删除套餐菜品关联信息
     * 
     * @param id 套餐菜品关联主键
     * @return 结果
     */
    @Override
    public int deleteComboProductsById(String id)
    {
        return comboProductsMapper.deleteComboProductsById(id);
    }
}
